import { exInput, exParams, exTag, exColorPicker, exInputNumber, exSetChartColor } from '@ve/common/components/extension'
export default {
  VERSION: '202200927',
  type: 'uiWarehouseTitle',
  name: '库位标题',
  icon: 'checkbox-blank-line',
  svg: 'kuwei_1',
  extension: {
    requestSet: {
      type: 'exRequestSet',
      name: '接口配置',
      value: {
        api: '/wms/wms-web',
        method: 'wms.visual.kanban.loc.query',
        getDataKey: 'wms.visual.kanban.loc.query',
        loopRequest: false,
        loopTime: 3000,
        nameKey: '',
        valueKey: '',
        busList: [],
        dataObj: {},
        isJson: false,
        data: [
          { key: '#LIMIT#', value: '1' },
          { key: '#PAGE_SIZE#', value: '10' },
        ],
        isSwiper: true,
        resList: [],
      },
    },
    titleText: exInput('标题', '库位状态看板'),
    titleColor: exColorPicker('标题颜色', '#fff'),
    titleSize: exInputNumber('标题大小', 20, 1, 100000),
    titleTop: exInputNumber('标题上边距', 31, 1, 100000),
    warehouseSize: exInputNumber('仓库文字大小', 26, 1, 100000),
    warehouseColor: exColorPicker('仓库颜色', '#fff'),
    boxInnerWidth: exInputNumber('分辨率宽', 1920, 1, 100000),
    boxInnerHeight: exInputNumber('分辨率高', 150, 1, 100000),
    radius: exInputNumber('圆角', 5, 0, 100),
    // padding: exInputNumber('内边距', 10, 0, 50),
    topPadding: {
      type: 'exInputNumber',
      name: '上内边距',
      value: 0,
    },
    rightPadding: {
      type: 'exInputNumber',
      name: '右内边距',
      value: 60,
    },
    bottomPadding: {
      type: 'exInputNumber',
      name: '下内边距',
      value: 0,
    },
    leftPadding: {
      type: 'exInputNumber',
      name: '左内边距',
      value: 44,
    },
    topMargin: {
      type: 'exInputNumber',
      name: '上外边距',
      value: 0,
    },
    rightMargin: {
      type: 'exInputNumber',
      name: '右外边距',
      value: 0,
    },
    bottomMargin: {
      type: 'exInputNumber',
      name: '下外边距',
      value: 0,
    },
    leftMargin: {
      type: 'exInputNumber',
      name: '左外边距',
      value: 0,
    },
    bgColor: exSetChartColor('背景颜色', '#ffffff00'),
    sideTextSize: exInputNumber('两侧字体大小', 24, 0, 50),
    highlightSize: exInputNumber('高亮字体大小', 31, 0, 50),
    subTitle: exParams('自定义展示', [
      { key: 'QTY', left: '共', right: '个库位', textColor: '#709ec5', highlightColor: '#ffffff' },
      { key: 'USE_QTY', left: '使用', right: '个', textColor: '#709ec5', highlightColor: '#ffffff' },
    ]),
    tagText: exInputNumber('标签字体大小', 15, 0, 50),
    tagClearance: exInputNumber('标签间隙', 10, 0, 50),
    tagList: exTag('自定义标签', [
      { key: 'FR', bgColor: '#0597FF', text: '空闲', width: 100, textColor: '#fff' },
      { key: 'US', bgColor: '#89CEBC', text: '已使用', width: 100, textColor: '#fff' },
    ]),
  },
  //交互
  interaction: [],
}
